# create a mark correlation function. the difference between our and other default
#   markcorr in spatstat is our function could handle large dataset and faster.
# 
#  data.ppp: should be a ppp class object with marks
#  marks:    a character or vector of the interested mark names, it could also be a 
#            bivariate function if marks also contains a "biva=c(mark,from,to)" which
#            specify the categroy make name and the type of make that from and to.
#  markfun:  interested mark function, template f(t1,t2,...) which t1 and t2 represent
#            marks of the two individual, ... is other relavent parameters.
#              For faster coomputation, we also implemented some mark function bu c code,
#            so it can be one name of the following name: 
#            "phylo_similar": calculate phylogenetic similarity between two individiduals,
#                             see details in the defination file of the function
#                              
#
# Author: guochun
###############################################################################

source("./mark correlation function/phylo_corr.R")

markcorr=function(data.ppp,marks,markfun,...){
	#TODO currently only support phylogenetic correlation function, impliment others
	if(markfun=="phylo_similar")
		re=phylo_corr(data.ppp,marks,...)
	return(re)
}

